<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style>
#div1 {width:100px; height:200px; background:#CCC; display:none;}
</style>
<script>
function showHide()
{
	var oDiv=document.getElementById('div1');
	
	if(oDiv.style.display=='block')
	{
		oDiv.style.display='none';
	}
	else
	{
		oDiv.style.display='block';
	}
}
</script>
</head>

<body>
<input type="button" value="显示隐藏" onclick="showHide()" />
<div id="div1">
</div>
</body>
</html>
